package com.netistate.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.netistate.base.BaseDao;
import com.netistate.pojo.ClientContact;

@Repository
public class ClientContactDao extends BaseDao<ClientContact, Integer>{

	@SuppressWarnings("unchecked")
	public List<ClientContact> findClientContactByProjectId(int pid) {
		String hql = "from ClientContact where projectid = ? order by company asc";
		Query query = getSession().createQuery(hql);
		query.setInteger(0, pid);
		return query.list();
	}

}
